<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdminsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admins', function (Blueprint $table) {
            $table->increments('id',10)->comment("ID");
            $table->string('name',30)->comment("账号");
            $table->string('email',30)->unique()->comment('邮箱');
            $table->bigInteger('mobile',15)->unique()->comment('手机号');
            $table->string('password',40)->comment('密码');
            $table->rememberToken()->comment('token');
            $table->integer('login_total',8)->comment('登录次数');
            $table->string('login_ip',30)->comment('登录IP');
            $table->tinyInteger('status',2)->default(1)->comment('状态，1正常2删除');
            $table->tinyInteger('sex',2)->default(1)->comment('性别，1男2女');
            $table->tinyInteger('is_delete',2)->default(1)->comment('是否删除，1正常，2删除');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admins');
    }
}
